#ifndef TB_TBOX_H
#define TB_TBOX_H

#include "prefix.h"
#include "zip/zip.h"
#include "xml/xml.h"
#include "libm/libm.h"
#include "libc/libc.h"
#include "math/math.h"
#include "hash/hash.h"
#include "utils/utils.h"
#include "regex/regex.h"
#include "object/object.h"
#include "memory/memory.h"
#include "stream/stream.h"
#include "string/string.h"
#include "network/network.h"
#include "charset/charset.h"
#include "platform/platform.h"
#include "database/database.h"
#include "algorithm/algorithm.h"
#include "container/container.h"
#include "coroutine/coroutine.h"

__tb_extern_c_enter__

#define TB_MODE_DEBUG (1)
#define TB_MODE_SMALL (2)

#ifdef __tb_debug__
#define __tb_mode_debug__ TB_MODE_DEBUG
#else
#define __tb_mode_debug__ (0)
#endif

#ifdef __tb_small__
#define __tb_mode_small__ TB_MODE_SMALL
#else
#define __tb_mode_small__ (0)
#endif

#define tb_init(priv, allocator) tb_init_(priv, allocator, (tb_size_t)(__tb_mode_debug__ || __tb_mode_small__), TB_VERSION_BUILD)

tb_bool_t tb_init_(tb_handle_t priv, tb_allocator_ref_t allocator, tb_size_t mode, tb_hize_t build);

tb_void_t tb_exit(tb_noarg_t);

tb_size_t tb_state(tb_noarg_t);

#ifdef TB_CONFIG_INFO_HAVE_VERSION
tb_version_t const* tb_version(tb_noarg_t);
#endif

__tb_extern_c_leave__

#endif // !TB_TBOX_H
